﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace S4Store.Domain
{
    public class Administrator
    {
        public int Id { get; set; }
        public String UserName { get; set; }
        public String Password { get; set; }
        public int? StoreId { get; set; }
        public String Name { get; set; }
        public int PositionType { get; set; }
        public String SessionKey { get; set; }
        public DateTime? LastLoginDate { get; set; }
        public DateTime? ThisLoginDate { get; set; }
        public int LoginTimes { get; set; }
        public bool IsClose { get; set; }

        
        public  Position Position
        {
            get
            {
                return PositionType.ToEnum<Position>();
            }
            set
            {
                PositionType = value.ToInt();
            }
        }

        public virtual Store Store { get; set; }
    }
}
